package com.huiyuanai.service.serviceImpl;

import com.huiyuanai.mapper.DepartmentMapper;
import com.huiyuanai.pojo.Department;
import com.huiyuanai.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: liwan
 * @Description:
 * @Date: create in 2022/1/13/013
 */
@Service
public class DepartmentServiceImpl implements DepartmentService {

    @Autowired
    private DepartmentMapper departmentMapper;

    @Override
    public List<Department> getDepatments() {
        List<Department> list = departmentMapper.getDepartments();
        return list;
    }

    @Override
    public Department getDepatmentById(Integer id) {
        Department depatment = departmentMapper.getDepatmentById(id);
        return depatment;
    }

}
